package megrez.mail.sender.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

import freemarker.cache.StringTemplateLoader;

/**
 * Freemarker模板配置。
 * 
 * @author Lucky Yang
 * @since 2.6.9
 */
@Configuration
public class FreemarkerConfiguration {
    @Bean
    public FreeMarkerConfigurer freemarkerConfig() {
        FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer();
        freeMarkerConfigurer.setPreTemplateLoaders(new StringTemplateLoader());
        return freeMarkerConfigurer;
    }
}
